<template>
	<view class="ty-components">
		<goods-card :goods="goods"></goods-card>
		<u-cell-group>
			<u-cell-item v-for="(item,index) in router" :key="index" :title="item.title" @click="go(item)"></u-cell-item>
		</u-cell-group>
		<official-account @load="bindload" @error="binderror"></official-account>
		<cart />
	</view>
</template>

<script>
	import goodsCard from '@/components/goods/card.vue'
	import cart from '@/components/cart/cart.vue'
	import addCart from '@/components/goods/addCart.vue'
	export default{
		components:{
			goodsCard,
			cart,
			addCart
		},
		data(){
			return {
				router:[{
					title:'首页',
					url:'pages/index/home',
					type:'to'
				},{
					title:'订单',
					url:'pages/order/orderList',
					type:'tab'
				},{
					title:'我的',
					url:'pages/person/personal',
					type:'tab'
				},{
					title:'搜索',
					url:'pages/goods/goodsSearch',
					type:'to'
				},{
					title:'商品列表',
					url:'pages/goods/goodsList',
					type:'to'
				},{
					title:'待确认订单',
					url:'pages/order/order',
					type:'to'
				},{
					title:'订单确认',
					url:'pages/order/orderConfirm',
					type:'to'
				},],
				goods:{
					activityId: "",
					afterSale: "",
					approvalNumber: "国药准字H10940095",
					brandName: "天津金耀药业有限公司",
					channelPolicyVO: {goodsId: "4a313f0f0a854557a171ef2db088c01c", policyId: "", isChannel: 1},
					commentnum: 0,
					dosageFormName: "乳膏剂",
					goodsPurpose:'用于感冒或者各种流行性感冒引起的头疼、头晕，发炎等症状',
					saleNum:'15',
					evaluate:'100%',
					gcName: "西药",
					goodsCode: "11366274|200",
					goodsCommName: "尤卓尔",
					goodsErpCode: "11366274|200",
					goodsId: "4a313f0f0a854557a171ef2db088c01c",
					goodsImage: "/store/0/1542073718793.jpg",
					goodsMarketPrice: -1,
					goodsName: "丁酸氢化可的松乳膏.尤卓尔.0.1%*20g.DSQHKDSRGYZE",
					goodsPlatformId: "25386695461612987",
					goodsPlatformName: "尤卓尔 丁酸氢化可的松乳膏.尤卓尔.0.1%*20g.DSQHKDSRGYZE",
					goodsPrice: 5,
					goodsTaxPrice: 10,
					goodsScopeName: "化学药制剂",
					goodsSearch: "",
					goodsShow: 1,
					goodsShowQty: -1,
					goodsSpec: "0.1%*20g",
					goodsStorage: 99999996,
					goodsUnitName: "盒",
					isActivity: 0,
					isB2bpay: "0",
					isCold: "0",
					isFavorite: 0,
					isGift: "0",
					isOtc: "",
					isSellpiece: "1",
					labelName: "",
					luckActivityId: "631789928795078656,742317470349524992,752555294428495872,780492796338372608,784092286135828480",
					minBuyQty: 1,
					packBig: -1,
					packNum: 1,
					packTotal: 200,
					packUnit: "",
					saleRate: 13,
					salenum: 4,
					storeId: "1",
					videoUrl: "",
					virtualGoods: 0
				}
			}
		},
		methods:{
			go(item){
				this.$u.route({
					url:item.url,
					type:item.type
				})
			},
			bindload(e){
				console.log(e)
			},
			binderror(e){
				console.log(e)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.float-right{
		height: 100rpx;
		position: relative;
		.float{
			position: absolute;
			left: 200rpx;
		}
	}
</style>
